package com.itheima.controller;

import com.itheima.entity.Result;
import com.itheima.entity.User;
import com.itheima.service.UserService;
import org.apache.dubbo.config.annotation.Reference;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("user")
public class UserController {
    @Reference
    private UserService userService;

    @RequestMapping("findAll")
    public Result findAll(){
        List<User> list = userService.findAll();
        System.out.println("秘制小汉堡");
        System.out.println("老八");
        System.out.println("lx");

        return new Result(true,list);
    }
}
